home *** CD-ROM | disk | FTP | other *** search
/ Amiga Magazin: Amiga-CD 1996 March / Amiga-CD 1996 #3.iso / demos / stormc-demo / include / dos.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-01-19  |  4.9 KB  |  173 lines

  1. #ifndef _INCLUDE_DOS_H
  2. #define _INCLUDE_DOS_H
  3.  
  4. /*
  5. **  $VER: dos.h 10.1 (19.7.95)
  6. **  Includes Release 40.15
  7. **
  8. **  '(C) Copyright 1995/96 Haage & Partner Computer GmbH'
  9. **     All Rights Reserved
  10. */
  11.  
  12. #ifndef EXEC_TYPES_H
  13. #include <exec/types.h>
  14. #endif
  15.  
  16. #ifndef EXEC_PORTS_H
  17. #include <exec/ports.h>
  18. #endif
  19.  
  20. #ifndef EXEC_LISTS_H
  21. #include <exec/lists.h>
  22. #endif
  23.  
  24. #ifndef LIBRARIES_DOS_H
  25. #include <libraries/dos.h>
  26. #endif
  27.  
  28. #ifndef LIBRARIES_DOSEXTENS_H
  29. #include <libraries/dosextens.h>
  30. #endif
  31.  
  32. typedef unsigned char byte;
  33.  
  34.  
  35. #define SECSIZ 512        /* disk sector size */
  36.  
  37.  
  38. #define FNSIZE 108    /* maximum file node size      - DOS limit */
  39. #define FMSIZE 256    /* maximum file name size      - DOS limit */
  40. #define FESIZE 32    /* maximum file extension size - arbitrary */
  41.  
  42.  
  43. struct MELT {
  44.     struct MELT *fwd;            /* points to next free block */
  45.     long size;                /* number of MELTs in this block */
  46. };
  47.  
  48. #define MELTSIZE sizeof(struct MELT)
  49.  
  50.  
  51. struct MELT2 {
  52.     struct MELT2 *fwd;            /* points to next block */
  53.     struct MELT2 *bwd;            /* points to previous block */
  54.     unsigned long size;            /* size of this block */
  55. };
  56.  
  57. #define MELT2SIZE sizeof(struct MELT2)
  58.  
  59.  
  60. struct ProcID {                /* packet returned from fork()  */
  61.     struct ProcID *nextID;        /* link to next packet        */
  62.     struct Message *process;            /* startup message to child     */
  63.     int UserPortFlag;
  64.     struct MsgPort *parent;        /* termination msg destination    */
  65.     struct MsgPort *child;        /* child process' task msg port    */
  66.     BPTR seglist;            /* child process' segment list    */
  67. };
  68.  
  69. struct FORKENV {
  70.     long priority;            /* new process priority        */
  71.     long stack;                    /* stack size for new process    */
  72.     BPTR std_in;            /* stdin for new process    */
  73.     BPTR std_out;            /* stdout for new process    */
  74.     BPTR console;            /* console window for new process */
  75.     struct MsgPort *msgport;            /* msg port to receive termination */
  76. };                      /* message from child        */
  77.  
  78. struct TermMsg {            /* termination message from child */
  79.     struct Message msg;
  80.     long _class;                    /* class == 0            */
  81.     short type;                    /* message type == 0        */
  82.     struct Process *process;            /* process ID of sending task    */
  83.     long ret;                    /* return value            */
  84. };
  85.  
  86.  
  87. #ifdef __cplusplus
  88. extern "C" {
  89. #endif
  90.  
  91. extern int forkl(char *, char *, ...);
  92. extern int forkv(char *, char **, struct FORKENV *, struct ProcID *);
  93. extern int wait(struct ProcID *);
  94. extern struct ProcID *waitm(struct ProcID **);
  95.  
  96. extern int dfind(struct FileInfoBlock *, const char *, int);
  97. extern int dnext(struct FileInfoBlock *);
  98.  
  99. extern int           _dclose(long);
  100. extern long          _dcreat(const char *, int);
  101. extern long          _dcreatx(const char *, int);
  102. extern long          _dopen(const char *, int);
  103. extern unsigned int  _dread(long, char *, unsigned int);
  104. extern long          _dseek(long, long, int);
  105. extern unsigned int  _dwrite(long, char *, unsigned int);
  106.  
  107. extern int getcd(int, char *);
  108. extern int chdir(const char *);
  109. extern char *getcwd(char *, int);
  110. extern int mkdir(const char *);
  111. extern int rmdir(const char *);
  112.  
  113. extern int getfnl(const char *, char *, size_t, int);
  114. extern int getdfs(const char *, struct InfoData *);
  115. extern int getfa(const char *);
  116. extern long getft(const char *);
  117.  
  118. extern int getpath(BPTR, char *);
  119. extern BPTR findpath(const char *);
  120.  
  121. extern long _BackGroundIO;   /* Declare and init to 1 to get stdout */
  122.                              /* in a cback program                  */
  123. extern BPTR _Backstdout;     /* Points to stdout in a cback program */
  124.                              /* If _BackGroundIO was set.  You are  */
  125.                              /* responsible for closing this!       */
  126. extern long __priority;      /* Default priority of cback programs  */
  127. extern char *__procname;     /* Default process name for cback progs*/                             
  128. #ifdef _M68881
  129. extern char __near __stdiowin[];  /* stdio window specification */
  130. #else
  131. extern char __stdiowin[];    /* stdio window specification */
  132. #endif
  133. extern char __stdiov37[];    /* Modifiers for stdio window, V37+ */
  134. extern long __oslibversion;  /* Minimum OS version for autoopen libs */
  135. extern long __stack;         /* Minimum stack size for program */
  136. extern long __STKNEED;       /* Minimum stack size for function */
  137.  
  138. extern int datecmp(const struct DateStamp *, const struct DateStamp *);
  139. extern int chgclk(const unsigned char *);
  140. extern void getclk(unsigned char *);
  141. extern int onbreak(int (*)(void));
  142. extern int poserr(const char *);
  143.  
  144. #ifdef __cplusplus
  145. }
  146. #endif
  147.  
  148. #define REG_D0 0
  149. #define REG_D1 1
  150. #define REG_D2 2
  151. #define REG_D3 3
  152. #define REG_D4 4
  153. #define REG_D5 5
  154. #define REG_D6 6
  155. #define REG_D7 7
  156. #define REG_A0 8
  157. #define REG_A1 9
  158. #define REG_A2 10
  159. #define REG_A3 11
  160. #define REG_A4 12
  161. #define REG_A5 13
  162. #define REG_A6 14
  163. #define REG_A7 15
  164. #define REG_FP0 16
  165. #define REG_FP1 17
  166. #define REG_FP2 18
  167. #define REG_FP3 19
  168. #define REG_FP4 20
  169. #define REG_FP5 21
  170. #define REG_FP6 22
  171. #define REG_FP7 23
  172. #endif
  173.